<template>
  <view class="container">
    <!-- <uni-nav-bar
    title="恋爱话术"
    fixed="true"
    status-bar="true"
    background-color="#76A3FD"
  ></uni-nav-bar> -->
  <view class="box">
    <view
      class="box_message"
      v-for="item in list"
      :key="item.id"
      @click="message(item)"
    >
      <image :src="item.src" mode="aspectFit" />
      <text>{{ item.name }}</text>
    </view>
  </view>
  </view>
</template>
<script>
import uniNavBar from "@/components/uni-nav-bar/uni-nav-bar.vue";
export default {
  components: { uniNavBar },
  data() {
    return {
      list: [
        {
          name: "藏头诗表白",
          type: "acrostic",
          src: "/static/technology/acrostic.png",
          id: 0,
        },
        {
          name: "姓名姻缘",
          type: "marriage",
          src: "/static/technology/marriage.png",
          id: 1,
        },
        {
          name: "情话表白",
          type: "lovetalk",
          src: "/static/technology/lovetalk.png",
          id: 2,
        },
        {
          name: "朋友圈包装",
          type: "exhibition",
          src: "/static/technology/exhibition.png",
          id: 3,
        },
      ],
    };
  },
  methods: {
    message(item) {
      uni.navigateTo({
        url: `./${item.type}/index`,
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.container{
  width: 100%;
  height: 100%;
}
.box {
  width: 100%;
  height: 500upx;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  .box_message {
    width: 330upx;
    height: 200upx;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    border: 2rpx solid #ccc;
    border-radius: 20upx;
    box-shadow: 4upx 5upx 5upx 5upx rgba(0, 0, 0, 0.2);
    image {
      width: 100upx;
      height: 100upx;
      display: block;
    }
    text {
      width: 100%;
      text-align: center;
    }
  }
}
</style>